//
//  AudioUploadState.m
//  SoundPill
//
//  Created by 宋旭东 on 15/3/11.
//  Copyright (c) 2015年 宋旭东. All rights reserved.
//

#import "AudioUploadState.h"
@implementation AudioUploadState
+ (AudioUploadState *)sharedInstance
{
    static AudioUploadState *state;
    static dispatch_once_t token;
    dispatch_once(&token, ^{
        state = [[AudioUploadState alloc] init];
    });
    return state;
}

- (id)init
{
    self = [super init];
    if (self) {
        self.images = [NSMutableArray array];
    }
    return self;
}
- (id)initWithCoder:(NSCoder *)aDecoder
{
    self = [super init];
    if (self) {
        self.uploadId = [aDecoder decodeObjectForKey:@"uploadId"];
        self.url = [aDecoder decodeObjectForKey:@"url"];
        self.waveUploadId = [aDecoder decodeObjectForKey:@"waveUploadId"];
        self.waveUrl = [aDecoder decodeObjectForKey:@"waveUrl"];
        self.state = [aDecoder decodeObjectForKey:@"state"];
        self.images = [NSMutableArray array];
    }
    return self;
}
- (void)encodeWithCoder:(NSCoder *)aCoder
{
    [aCoder encodeObject:self.uploadId forKey:@"uploadId"];
    [aCoder encodeObject:self.url forKey:@"url"];
    [aCoder encodeObject:self.waveUploadId forKey:@"waveUploadId"];
    [aCoder encodeObject:self.waveUrl forKey:@"waveUrl"];
    [aCoder encodeObject:self.state forKey:@"state"];
}
@end
